package cn.tedu.submarine;

import javax.swing.*;

//鱼雷
public class Torpedo extends SeaObject{

    /**构造方法*/
    public Torpedo(int x,int y){
        super(5,18,x,y,1);
    }
    public void step(){
        y -= speed;
    }
    public ImageIcon getImage(){
        if(isLive()){
            return Images.torpedo;
        }else{
            return null;
        }
    }


    public Boolean isOutOfBounds() {
        return this.y<=-this.height;
    }
}
